package ch06.ex1_4_1_ElvisOperator

/**
 * Created by caozp-ytcyc2007 on 2017/5/26.
 */

fun strLenSafe(s: String?): Int = s?.length ?: 0

fun main(args: Array<String>) {
    println(strLenSafe("abc"))
    println(strLenSafe(null))
}